package com.hik.controller;

import com.alibaba.fastjson.JSONObject;
import com.hik.entity.HIKPage;
import com.hik.utils.HikHcUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "会议资源")
@RequestMapping("hyzy")
@RestController
public class HikHYZYController {
    @ApiOperation("查询会场成员")
    @GetMapping("gethycy")
    public JSONObject getHccy(@ApiParam("页数")@RequestParam("page") int page, @ApiParam("条数")@RequestParam("rows")int rows){
        HIKPage page1=new HIKPage(page,rows);
        String str=JSONObject.toJSONString(page1);
        JSONObject jsonObject = HikHcUtils.hc(str);
        return jsonObject;
    }
    @ApiOperation("分页查询mcu")
    @GetMapping("getMcu")
    public JSONObject getMcu(@ApiParam("页数")@RequestParam("page") int page,
                             @ApiParam("条数")@RequestParam("rows")int rows){
        HIKPage page1=new HIKPage(page,rows);
        String str=JSONObject.toJSONString(page1);
        JSONObject jsonObject = HikHcUtils.mcuSelect(str);
        return jsonObject;
    }
}
